package com.xuelang.pipeline.app.resource.converter;

import com.xuelang.pipeline.client.resource.dto.ClusterDTO;
import com.xuelang.pipeline.domain.resource.Cluster;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 集群DTO与集群实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface ClusterDTOToClusterConverter {
    ClusterDTOToClusterConverter INSTANCE = Mappers.getMapper(ClusterDTOToClusterConverter.class);

    /**
     * Cluster转化为ClusterDTO
     * @param cluster
     * @return
     */
    ClusterDTO clusterToClusterDTO(Cluster cluster);

    /**
     * ClusterDTO转化为Cluster
     * @param clusterDTO
     * @return
     */
    Cluster clusterDTOToCluster(ClusterDTO clusterDTO);
}
